 /***************************************************************************
 *   Copyright (C) 2010 by ZhangShine , All Rights Reserved                                  
 *   zhangshine0125@gmail.com                                              
 *                                                                         
 *   This program is free software; you can redistribute it and/or modify  
 *   it under the terms of the GNU General Public License as published by  
 *   the Free Software Foundation; either version 2 of the License, or     
 *   (at your option) any later version.                                   
 *                                                                         
 *   This program is distributed in the hope that it will be useful,       
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         
 *   GNU General Public License for more details.                          
 *                                                                         
 *   You should have received a copy of the GNU General Public License     
 *   along with this program; if not, write to the                         
 *   Free Software Foundation, Inc.,                                       
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             
 ***************************************************************************/

#ifndef ACCOUNT_H
#define ACCOUNT_H

#include <QList>
#include <QMap>
#include "status.h"

/*! \class Account
 * \brief 用户帐号
 *
 * 新浪微博用户的一些信息
 */
class Account
{
public:
    Account();
    
    void setUsername(QString username){this->username = username;}
    QString getUsername(){ return this->username; }

    void setPassword(QString password){ this->password = password; }
    QString getPassword(){ return this->password; }

    void setId(QString id){ this->id = id; }
    QString getId(){ return this->id; }

    void setScreenName(QString screenName){ this->screenName = screenName; }
    QString getScreenName(){ return this->screenName; }

    void setName(QString name){ this->name = name;}
    QString getName(){ return this->name; }

    void setProfileImageUrl(QString profileImageUrl){ this->profileImageUrl = profileImageUrl;}
    QString getProfileImageUrl(){ return this->profileImageUrl; }

    void setVerified( bool verified ){ this->verified = verified;}
    bool isVerified(){ return this->verified; }

    void setFriends( int friends ){ this->friends = friends; }
    int getFriends(){ return this->friends; }

    void setFollower( int follower ){ this->follower = follower; }
    int getFollower(){ return this->follower; }

    void setWeiboCount( int weiboCount ){ this->weiboCount = weiboCount; }
    int getWeiboCount(){ return this->weiboCount; }

    

    void StatusManagerAdd(QList<Status> &addToStatusList, QMap<QString, Status> &addToRetwMap,
                          Status &status, Status &retwStatus, int limit, bool isStart);
    void StatusManagerRemove(QList<Status> &statusListRemoveOne, QMap<QString, Status> &RetwMap);

    //重载方法
    void RemoveAll(QList<Status> &statusList, QMap<QString, Status> &retwMap);
    void RemoreAll(QList<Status> &statusList);
    
//signals:

//public slots:
    
private:
    QString username;
    QString password;
    QString id;//用户id
    QString screenName;//昵称
    QString name;//同微博昵称
    QString profileImageUrl;//用户头像
    bool verified;//是否认证
    int friends;//关注数
    int follower;//粉丝数
    int weiboCount;//发表微博数

public:
    QList<Status> homePageStatus;
    QList<Status> atMePageStatus;
    QList<Status> userWeiboPageStatus;
    QList<Status> favoritesPageStatus;
    QList<Status> commentPageComments;//comment
    QList<Status> directMessagePageStatus;
    QMap<QString, Status> homePageRetweeted;
    QMap<QString, Status> atMePageRetweeted;
    QMap<QString, Status> userWeiboPageRetweeted;
    QMap<QString, Status> favoritesPageRetweeted;
    QMap<QString, Status> commentPageRetweeted;//status, no retweeted status
};

#endif // ACCOUNT_H
